<template>
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul side-navigation class="nav metismenu" id="side-menu">
                <li class="nav-header">
                    <div class="logo-element">
                    </div>
                </li>
                <li class="active">
                    <a href="index.html"><i class="fa fa-th-large"></i> <em class="nav-label">采购管理</em> <span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li class="active">
                            <router-link :to="{ name: 'purchaseApply'}">采购申请</router-link>
                        </li>
                        <li>
                            <router-link :to="{ name: 'purchaseAudit_index'}">采购审核</router-link>
                        </li>
                        <li>
                            <router-link :to="{ name: 'pactManage_index'}">合同管理</router-link>
                        </li>
                        <li><a href="dashboard_4_1.html">合同审核</a></li>
                        <li><a href="dashboard_5.html">付款申请 <span class="label label-primary pull-right">NEW</span></a></li>
                        <li><a href="dashboard_4_1.html">合同结算</a></li>
                        <li><a href="dashboard_4_1.html">入库通知</a></li>
                        <li><a href="dashboard_4_1.html">长协管理</a></li>
                        <li><a href="dashboard_4_1.html">长协审核</a></li>
                    </ul>
                </li>

                <li>
                    <a href="#"><i class="fa fa-bar-chart-o"></i> <em class="nav-label">销售管理</em><span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level collapse">
                        <li><a href="graph_flot.html">销售定价</a></li>
                        <li><a href="graph_morris.html">销售资源</a></li>
                        <li><a href="graph_rickshaw.html">销售订单</a></li>
                        <li><a href="graph_chartjs.html">订单审核</a></li>
                        <li><a href="graph_chartist.html">出库通知</a></li>
                    </ul>
                </li>
                <li>
                    <a href="mailbox.html"><i class="fa fa-envelope"></i> <em class="nav-label">库存管理 </em><span class="label label-warning pull-right">16/24</span></a>
                    <ul class="nav nav-second-level collapse">
                        <li><a href="mailbox.html">Inbox</a></li>
                        <li><a href="mail_detail.html">Email view</a></li>
                        <li><a href="mail_compose.html">Compose email</a></li>
                        <li><a href="email_template.html">Email templates</a></li>
                    </ul>
                </li>
                <li>
                    <a href="metrics.html"><i class="fa fa-pie-chart"></i> <em class="nav-label">客户管理</em>  </a>
                </li>
                <li>
                    <a href="mailbox.html"><i class="fa fa-envelope"></i> <em class="nav-label">财务管理 </em><span class="label label-warning pull-right">16/24</span></a>
                    <ul class="nav nav-second-level collapse">
                        <li><a href="mailbox.html">Inbox</a></li>
                        <li><a href="mail_detail.html">Email view</a></li>
                        <li><a href="mail_compose.html">Compose email</a></li>
                        <li><a href="email_template.html">Email templates</a></li>
                    </ul>
                </li>
                <li>
                    <a href="mailbox.html"><i class="fa fa-envelope"></i> <em class="nav-label">系统管理 </em><span class="label label-warning pull-right">16/24</span></a>
                    <ul class="nav nav-second-level collapse">
                        <li><a href="mailbox.html">Inbox</a></li>
                        <li><a href="mail_detail.html">Email view</a></li>
                        <li><a href="mail_compose.html">Compose email</a></li>
                        <li><a href="email_template.html">Email templates</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</template>

<script>
    import util from '../../js/lib/util'
    
    var datas ={
        
    }

    export default {
        data() {
            return {

            }
        },
        methods: {

            fetchMenu: function () {
                console.log(util.api)

                $.ajax({
                    url: util.api,
                    type: 'POST',
                    data: {
                        "accesstoken": "accesstoken",
                        "command": "online_users",
                        "data": "",
                        "timestamp": 1484623209889,
                        "version": "1.0"
                    },
                    contentType:"application/json",
                    success: function (data) {
                        if (data) {
                            alert("提交成功")

                        } else {
                            alert("提交失败")
                        }
                    }
                })

            }
        },
        mounted() {
            this.fetchMenu()
        }

    }
</script>